#include "headfiles.h"

using namespace std;

int main(int argc, char **argv) {
    if (argc != 3) {
        cout << "Usage: " << argv[0] << " n m" << endl;
        return 0;
    }

    int n = atoi(argv[1]);
    int m = atoi(argv[2]);

    if (m > n) {
        cout << "Invalid arguments, m = " << m << " > " << " n = " << n << endl;
        return 1;
    }

    int *array = (int *) malloc(sizeof(int) * n);
    if (array == NULL) {
        cout << "Allocate array buffer error, NULL!" << endl;
        return 1;
    }

    int i;
    for (i = 0; i < n; i++) {
        array[i] = i;
    }

    shuffleDeck(array, n);

    bool ret;
    //ret = findnNums(array, n, m);
    ret = findnNums1(array, n, m);

    free(array);

    return 0;
}
